package dfbz.demo04;

public class Test01 {
    public static void main(String[] args) {
        int odd=0;
        int even=0;
        int i=1;
        while (i<=100){
            if(i%2==0){
                odd+=i;
            }else {
                even+=i;
            }
            i++;
        }
        System.out.println("1-100的偶数和为"+odd);
        System.out.println("1-100的奇数和为"+even);
    }
}
